#pragma once
namespace lcir {
class Result {
 public:
  enum State {
    Succeed,
    Fail,
  };

 private:
  State state;

 public:
  Result(State state) : state(state) {}
  State getState() const { return state; }
};
inline bool succeeded(const Result &r) { return r.getState() == Result::Succeed; }
inline bool failed(const Result &r) { return r.getState() == Result::Fail; }
inline Result success() { return Result(Result::Succeed); }
inline Result failure() { return Result(Result::Fail); }
}  // namespace lcir